<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>商务谈判-目的地运营集团数据管理平台</title>
<include file="Include:style" />
</head>
<body style="background: #f3f3f3;">
<div class="header">
    <a class="menu_btn" href="javascript:;"><span class="sp1"></span><span class="sp2"></span><span class="sp3"></span></a>
	商务谈判
	<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
		<if condition="(($project['tp_status'] eq NULL) or ($project['tp_status'] eq -1)) and ($project['gt_status'] eq 1)">
			<a href="javascript:;" class="header_txt_btn jd_up" pid="{$project['id']}" action="tp_status" status="1">阶段完成</a>
		<elseif condition="($project['tp_status'] eq 1) and (($project['qy_status'] eq -1) or ($project['qy_status'] eq NULL))"/>
			<a href="javascript:;" class="header_txt_btn jd_down" pid="{$project['id']}" action="tp_status" status="-1">放弃完成</a>
		</if>
	</if>
</div>
<include file="Include:commu_menu" />
<div class="content">
	<if condition="$result eq NULL">
		<div class="no_data_list">
			暂无相关数据
		</div>
	</if>
    <div class="communicate_list negotiate_list">
        <ul>
			<foreach name="result" item="vo">
            <li>
                <div class="tim_tit clearboth"><span class="float_l">{$vo['date']}</span><span class="float_r" style="color:#999">添加人(日期)：{$vo['add_user']}({$vo['add_date']|substr=0,10})</span></div>
                <p class="tit">{$vo['type']}<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)"><if condition="$project['tp_status'] neq 1"><a href="javascript:;" mid="{$vo['id']}" action="negotiation_delete"  class="btn icon_delete_btn"></a></if></if></p>
                <p class="people"><span class="kh"><a href="javascript:;" class="customer" mid="{$vo['ocid']}">客户：{$vo['ouser']}</span></a><span class="kc">考察/接待人员：{$vo['bus_users']}</span></p>
                <p>{$vo['content']}</p>
            </li>
			</foreach>
        </ul>
		<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
			<if condition="$project['tp_status'] neq 1">
				<div class="build_btn paddbox"><div><a class="sub_btn" href="__APP__/Mobile/Project/project_negotiation_add/id/{$project['id']}">新建</a></div></div>
			</if>
		</if>
    </div>
</div>
<!--弹框-->
<div class="customer_alert">
    <div class="alert_title">客户详情<a class="close" href="javascript:;"><img src="__PUBLIC__/mobile/images/project/clo_icon_y.png"></a></div>
    <div class="alert_body">
        <div class="form_table lh30">
            
        </div>
    </div>
</div>
<include file="Include:javascript" />
<script>
    $(function(){
        menu();
        //删除
		$(".icon_delete_btn").ajaxModal({"title_text":"确认提示框","body_text":"您确定要删除吗？","url":"__APP__/Mobile/Project/stage_ajax","data":{"id":"mid","action":"action"}});
		$(".jd_up").ajaxModal({"title_text":"完成提示框","body_text":"您确定要完成该阶段吗？","url":"__APP__/Mobile/Project/stage_ajax","data":{"id":"pid","action":"action","status":"status"}});
		$(".jd_down").ajaxModal({"title_text":"放弃提示框","body_text":"您确定要放弃该阶段吗？","url":"__APP__/Mobile/Project/stage_ajax","data":{"id":"pid","action":"action","status":"status"}});
	
        $('.customer_alert .close').click(function(){
            $('.customer_alert').fadeOut();
            $('.Mask').fadeOut(function(){
                $(this).remove();
            })
        })
		//客户详情
		$(".customer").on("click",function(){
            Mask();
			var mid = $(this).attr("mid");
			$.ajax({
				type:"POST",
				async:false,
				dataType:"json",
				data:{"id":mid},
				url:"__APP__/Mobile/Project/project_card_detail",
				success:function(data){
					var html = "<table>";
					html+="<tr><td class='form_table_left'>姓名</td><td class='form_table_right'>";
					html+=data.username ? data.username : "";
					html+="</td></tr>";
					html+="<tr><td class='form_table_left'>性别</td><td class='form_table_right'>";
					html+=data.gender ? data.gender : "";
					html+="</td></tr>";
					html+="<tr><td class='form_table_left'>公司名称</td><td class='form_table_right'>";
					html+=data.company_name ? data.company_name : "";
                    html+="</td></tr>";
                    html+="<tr><td class='form_table_left'>职位</td><td class='form_table_right'>";
					html+=data.job ? data.job : "";
					html+="</td></tr>";
					html+="<tr><td class='form_table_left'>手机号</td><td class='form_table_right'>";
					html+=data.mobilephone ? data.mobilephone : "";
                    html+="</td></tr>";
                    html+="</td><td class='form_table_left'>座机号</td><td class='form_table_right'>";
					html+=data.telephone ? data.telephone : "";
					html+="</td></tr>";
					html+="</td><td class='form_table_left'>QQ</td><td class='form_table_right'>";
					html+=data.qq ? data.qq : "";
                    html+="</td></tr>";
                    html+="</td><td class='form_table_left'>邮箱</td><td class='form_table_right'>";
					html+=data.email ? data.email : "";
					html+="</td></tr>";
					html+="</td><td class='form_table_left'>地址</td><td class='form_table_right'>";
					if(data.province){
						html+=data.province+"-"+data.city;
						html+=data.address ? "-"+data.address : "";
					}else{
						html+=data.address ? data.address : "";
					}
					html+="</td></tr>";
					html+="</td><td class='form_table_left'>其他信息</td><td class='form_table_right'>";
					html+=data.remark ? data.remark : "";
					html+="</td></tr>";
					html+="</table>";
                    $(".customer_alert").find(".form_table").html(html);
                    $('.customer_alert').fadeIn();
				}
			});
		});
    })
</script>
</body>
</html>